<!DOCTYPE html>
<html>
<head>
	<meta content='width=device-width' name='viewport'>
	<meta charset="utf-8">
	<title>WLED更新</title>
	<script>
		function B() { window.history.back(); }
		function U() { document.getElementById("uf").style.display="none";document.getElementById("msg").style.display="block"; }
		function GetV() {/*injected values here*/}
	</script>
	<style>
		@import url("style.css");
	</style>
</head>

<body onload="GetV()">
	<h2>WLED软件更新</h2>
	<form method='POST' action='./update' id='uf' enctype='multipart/form-data' onsubmit="U()">
		安装版本: <span class="sip">##VERSION##</span><br>
		下载最新固件: <a href="https://github.com/Aircoookie/WLED/releases" target="_blank">
		<img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a><br>
		<input type='file' name='update' required><br> <!--should have accept='.bin', but it prevents file upload from android app-->
		<button type="submit">更新！</button><br>
		<button type="button" onclick="B()">后退</button>
	</form>
	<div id="msg"><b>更新中...</b><br>请不要关闭或刷新此页面:)</div>
</body>
</html>